﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="KuaJing.Memberships"
				        namespace="KuaJing.Memberships.Domain">

  <class name="Actor" table="Membership_Actor" lazy="false">
    <!--lazy=false立即加载 -->
    <id name="Id" access="field.camelcase"
        column="ActorId" type="Int32">
      <generator class="native" />
    </id>
    <version name="Version" access="field.camelcase" />
    <!--one-to-many    inverse： cascade：-->
    <set name="Memberships" table="Membership_Actor_Membership" inverse="true" cascade="all" >
      <key column="ActorId" foreign-key="fk_actor_membership"></key>
      <many-to-many class="KuaJing.Memberships.Domain.Membership,KuaJing.Memberships" column="MembershipId"></many-to-many>
    </set>

    <property name="Name" />
    <property name="Alias" />
   
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>
